package com.markyao.dao.mapper;

import com.markyao.dao.pojo.MiaoshaOrder;
import com.markyao.dao.pojo.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MiaoshaMapper {

    //通过uid和商品id查找秒杀订单
    MiaoshaOrder findByUidAndGoodId(@Param("uid") Integer uid, @Param("pid") Integer goodsId);

    //生成秒杀订单
    void insert(@Param("uid") Integer uid, @Param("pid")Integer goodsId);

    //查找秒杀商品列表
    List<Product> findMiaoshaList();
}
